﻿using System;

namespace Validator
{
    [AttributeUsage(AttributeTargets.Property, AllowMultiple = true)]
    public abstract class BaseValidator : Attribute
    {
        public string Message { get; set; }

        public string FriendlyName { get; set; }

        public abstract bool IsValid(object item, bool ValidateEmptyString = false);

        public BaseValidator(string _message, string _friendlyName = "")
        {
            Message = _message;
            FriendlyName = _friendlyName;
        }
    }
}
